-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Add PIO-assisted WS2812 LEDs driver #6551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Change the Kconfig dependencies so that RP1_PIO depends on FIRMWARE_RP1, rather than selecting it. Signed-off-by: Phil Elwell <[email protected]>
Having changed a Kconfig "select" to a "depends on", RP1_PIO must be explicitly enabled. Signed-off-by: Phil Elwell <[email protected]>
Sort the probe function initialisation into a more logical order. Signed-off-by: Phil Elwell <[email protected]>
Floating point arithmetic is not supported in the kernel, so use fixed point instead. Signed-off-by: Phil Elwell <[email protected]>
No functional change. Signed-off-by: Phil Elwell <[email protected]>
Add kernel-facing implementations of pio_sm_config_xfer and pio_xm_xfer_data. Signed-off-by: Phil Elwell <[email protected]>
ws2812-pio-rp1 is a PIO-based driver for WS2812 LEDS. It creates a character device in /dev, the default name of which is /dev/leds<n>, where <n> is the instance number. The number of LEDS should be set in the DT overlay, as should whether it is RGB or RGBW, and the default brightness. Write data to the /dev/* entry in a 4 bytes-per-pixel format in RGBW order: RR GG BB WW RR GG BB WW ... The white values are ignored unless the rgbw flag is set for the device. To change the brightness, write a single byte to offset 0, 255 being full brightness and 0 being off. Signed-off-by: Phil Elwell <[email protected]>
Add an overlay to enable a WS2812 LED driver on a given GPIO. Signed-off-by: Phil Elwell <[email protected]>
Enable the WS2812_PIO_RP1 driver in both the defconfig files that support the Pi 5 family. Signed-off-by: Phil Elwell <[email protected]>
popcornmix
added a commit
to raspberrypi/firmware
that referenced
this pull request
Dec 20, 2024
kernel: dtoverlays: Add override for target-path on I2C overlays See: raspberrypi/linux#6541 kernel: misc: rp1-pio: Support larger data transfers See: raspberrypi/linux#6543 kernel: dtoverlays: Use continuous clock mode for ov9281 See: raspberrypi/linux#6542 kernel: overlays: goodix: Allow override i2c address See: raspberrypi/linux#6547 kernel: Add PIO-assisted WS2812 LEDs driver See: raspberrypi/linux#6551 kernel: overlays: Add and document i2c_csi_dsi0 parameters See: raspberrypi/linux#6553
popcornmix
added a commit
to raspberrypi/rpi-firmware
that referenced
this pull request
Dec 20, 2024
kernel: dtoverlays: Add override for target-path on I2C overlays See: raspberrypi/linux#6541 kernel: misc: rp1-pio: Support larger data transfers See: raspberrypi/linux#6543 kernel: dtoverlays: Use continuous clock mode for ov9281 See: raspberrypi/linux#6542 kernel: overlays: goodix: Allow override i2c address See: raspberrypi/linux#6547 kernel: Add PIO-assisted WS2812 LEDs driver See: raspberrypi/linux#6551 kernel: overlays: Add and document i2c_csi_dsi0 parameters See: raspberrypi/linux#6553
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Extend the in-kernel PIO support to include data transfers via DMA. Use that to implement a WS2812 LEDs driver.